package a;

//p184 泛型方法
public class demo3 {
    public static <T> void ShowShopping(T[] arr){
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i] + "\t");
            System.out.println();
        }
    }
    public static void main(String[] args) {
        String[] color = {"黄色","紫色","蓝色","白色","粉色","绿色"};
        Integer[] count = {25,32,14,8,40,12};
        System.out.print("商品颜色：");
        demo3.ShowShopping(color);
        System.out.print("商品数量：");
        demo3.ShowShopping(count);
    }
}
